<?php
namespace Cyfy\Modules\ListBoxes\Forms;

use \Cyfy\Modules\Forms;
use \Cyfy\Modules\ListBoxes\Module;

/**
  * Updates a listbox
  */
class EditBox extends NewBox
{

	function submit()
	{
        $values = array(
            "name" => $this->get("name"),
            "code" => $this->get("code")
        );
     	\dibi :: query("UPDATE [:cyfy:ListBoxes-boxes] SET %a", $values, " WHERE [lid] = %i", $this -> getTemp("lid"));
        
        $this -> action = "administration/ListBoxes/listOf/" . $this -> getTemp("lid");
		\Cyfy\Message :: set(self :: t(51, array($this -> get("code"))));
		return true;
	}
}